#ifndef WF_PLAYER_JNI_CALL_JAVA_H
#define WF_PLAYER_JNI_CALL_JAVA_H

#include <jni.h>

enum ThreadMode {
    THREAD_CHILD, THREAD_MAIN
};

class JniCallJava {
public:
    JavaVM *javaVm;
    JNIEnv *jniEnv;
    jmethodID jErrorMid;
    jmethodID jPreparedMid;
    jobject jPlayerObj;
public:
    JniCallJava(JavaVM *javaVm, JNIEnv *jniEnv, jobject jPlayerObj);

    ~JniCallJava();

public:
    void callOnPrepared(ThreadMode threadMode);

    void callOnError(ThreadMode threadMode, int errorCode, char *errorMsg);
};


#endif
